#include <stdio.h>

union Mark_Course {
    double mark;
    char *course;
};

struct StuTeacher {
    int id;
    char *name;
    char gender;
    char *profession;
    union Mark_Course mark_course; 

};

int main(){
    // 字符指针直接指向字符串字面量，没有malloc不能更改
    struct StuTeacher stu = {101, "Kitty", 'm', "s", .mark_course.mark = 89.5};
    struct StuTeacher teacher = {102, "Kim", 'm', "t", .mark_course.course = "math"};

    printf("%d %s %c %s %lf \n", stu.id, stu.name, stu.gender, stu.profession, stu.mark_course.mark);
    printf("%d %s %c %s %s \n", teacher.id, teacher.name, teacher.gender, teacher.profession, teacher.mark_course.course);


    return 0;
}